<%-- 
    Document   : perfil
    Created on : 03/06/2011, 16:08:44
    Author     : Fatec
    Propósito  : Apresetar formulário com controles para alterar campos do cadastro do perfil do usuário
--%>

<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FATECZ - Perfil</title>
</head>
<body>
    <%
    java.sql.Connection con = br.com.fatecz.database.ConnectionPool.getConnection();
    java.sql.Statement stmt = con.createStatement();
    java.sql.ResultSet rs = stmt.executeQuery(""
            + "SELECT nome, email, sobre_mim, data_nasc, cidade, estado, "
                   + "mensagem_instantanea, skype, orkut, facebook, twitter, linkedin, blog, interesses "
              + "FROM usuarios "
             + "WHERE id = 4;"); //nesta linha, seria necessario inserir o ID requisitado do parametro da URL
    rs.next();
    %>
   <div id="conteudo">
   	 <div id="tituloPagina"><div class="iconMenuEdicaoNoticias"></div>&nbsp;Bem Vindo(a) <%= rs.getString("nome") %></div>
        <div id="linhaDivisoria"></div>
                  
        <table width="100%" class="table-formulario" cellspacing="3px">
          <tr>
            <td width="20%" class="label">Nome</td>
            <td width="80%" class="cel"><input id="txtNome" type="text" size="70" value="<%= rs.getString("nome") %>"/></td>
          </tr>
          <tr>
            <td class="label">E-mail</td>
            <td class="cel"><input id="txtEmail" type="text" disabled="disabled" value="<%= rs.getString("email") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Data de Nascimento</td>
            <td class="cel"><input type="text" id="txtData" size="6" value="<%= rs.getString("data_nasc") %>"/></td>
          </tr>
          <tr>
            <td class="label">Cidade</td>
            <td class="cel"><input type="text" id="txtCidade" size="20" value="<%= rs.getString("cidade") %>"/>
                <label>
                <input type="text" id="txtEstado" size="3" value="<%= rs.getString("estado") %>"/>
              </label></td>
          </tr>
          <tr>
            <td class="label">Foto</td>
            <td class="cel"><label>
              <input type="submit" name="btnProcurar" id="btnProcurar" value="Procurar..." />
              [Nome arquivo]
              <input type="submit" name="btnCarregar" id="btnCarregar" value="Carregar" />
            </label></td>
          </tr>
        </table>
        
		<div id="linhaDivisoria"></div>
                  
        <table width="100%" class="table-formulario" cellspacing="3px">
          <tr>
            <td width="20%" class="label">Sobre mim</td>
            <td width="80%" class="cel"><label>
              <textarea name="txtSobre" cols="45" rows="5" id="txtSobre"><%= rs.getString("sobre_mim") %></textarea>
            </label></td>
          </tr>
          <tr>
            <td class="label">Mensagem Instantânea</td>
            <td class="cel"><input name="txtMensagemInstantanea" type="text" id="txtMensagemInstantanea" value="<%= rs.getString("mensagem_instantanea") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Skype</td>
            <td class="cel"><input name="txtSkype" type="text" id="txtSkype" value="<%= rs.getString("skype") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Blog</td>
            <td class="cel"><input name="txtBlog2" type="text" id="txtBlog" value="<%= rs.getString("blog") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Orkut</td>
            <td class="cel"><input name="txtOrkut" type="text" id="txtOrkut" value="<%= rs.getString("orkut") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Facebook</td>
            <td class="cel"><input name="txtFacebook" type="text" id="txtFacebook" value="<%= rs.getString("facebook") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Twitter</td>
            <td class="cel"><input name="txtTwitter" type="text" id="txtTwitter" value="<%= rs.getString("twitter") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">LinkedIn</td>
            <td class="cel"><input name="txtLinkedIn" type="text" id="txtLinkedIn" value="<%= rs.getString("linkedin") %>" size="40"/></td>
          </tr>
          <tr>
            <td class="label">Interesses</td>
            <td class="cel"><label>
              <textarea name="txtInteresses" cols="45" rows="5" id="txtInteresses"><%= rs.getString("interesses") %></textarea>
            </label></td>
          </tr>
        </table>
		
	 <div id="linhaDivisoria"></div>
        
        <table width="100%" class="table-formulario" cellspacing="3px">
          <tr>
            <td class="botao"><label>
              <input type="submit" name="btnSalvar" id="btnSalvar" value="Salvar" />
            </label></td>
          </tr>
        </table>

   </div>
   <div id="lembretes">
        <div id="notificacoes"> Notificações</div>
   </div>
</body>
</html>